<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>


        var o1={
            a :1,
            mol:function(){
                console.log(this.a);
                var evt=new Event("abc");
                evt.a=this.a;
                document.dispatchEvent(evt);
            },
            run:function(){

            }

        }

        var o2={
            b:2,
            play1:function(){
                document.addEventListener("abc",this.run1)
            },
            run1:function(e){
                console.log(e.a,"o2");
            }
        }












    </script>
</body>
</html>